package cate.game.play.proce.round;

import cate.game.play.proce.action.po.ActionPO;
import easy.java.dev.note.NoteClass;
import easy.java.dev.note.NoteField;
import lombok.extern.slf4j.Slf4j;

import java.util.ArrayList;
import java.util.List;

@Slf4j
@NoteClass("剧本的单个回合数据")
public class RoundPO {

	@NoteField("行动数据")
	public List<ActionPO> actions = new ArrayList<>();

	public RoundPO() {
	}

	public void addAction(ActionPO action) {
		if (action == null) {
			return;
		}
		actions.add(action);
	}


	/** 精简优化 */
	public void streamline() {
		actions.removeIf(ActionPO::isEmpty);
	}
}
